﻿using AutoMapper;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Identity;

namespace EcoSystem;

public class EcoSystemApplicationAutoMapperProfile : Profile
{
    public EcoSystemApplicationAutoMapperProfile()
    {
        /* 
         * You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. 
         */

        //配置中心
        CreateMap<ConfigCategory, ConfigCategoryDto>(MemberList.None);
        CreateMap<CreateOrUpdateConfigCategoryDto, ConfigCategory>(MemberList.None);
        CreateMap<ConfigDefineDto, ConfigDefine>(MemberList.None);
        CreateMap<ConfigDefine, ConfigDefineDto>(MemberList.None);
        CreateMap<CreateOrUpdateConfigDefineDto, ConfigDefine>(MemberList.None);
        CreateMap<ConfigSetting, ConfigSettingDto>(MemberList.None);
        CreateMap<CreateOrUpdateConfigSettingDto, ConfigSetting>(MemberList.None);
        CreateMap<TakeConfig, TakeConfigDto>(MemberList.None);
        CreateMap<CreateOrUpdateTakeConfigDto, TakeConfig>(MemberList.None);

        //数据字典
        CreateMap<DictionaryItem, DictionaryItemDto>(MemberList.None);
        CreateMap<CreateOrUpdateDictionaryItemDto, DictionaryItem>(MemberList.None);
        CreateMap<DictionaryValue, DictionaryValueDto>(MemberList.None);
        CreateMap<DictionaryValueDto, DictionaryValue>(MemberList.None);

        //系统菜单
        CreateMap<SystemMenu, SystemMenuDto>(MemberList.None);
        CreateMap<CreateOrUpdateSystemMenuDto, SystemMenu>(MemberList.None);

        //系统用户
        CreateMap<SystemUser, SystemUserDto>(MemberList.None);
        CreateMap<CreateOrUpdateSystemUserDto, SystemUser>(MemberList.None);
        CreateMap<IdentityRoleDto, IdentityRole>(MemberList.None);

        //权限定义
        CreateMap<PermissionDefinition, PermissionDefinitionDto>(MemberList.None);

        //文件上传服务相关
        CreateMap<Bucket, BucketDto>(MemberList.None);
        CreateMap<CreateOrUpdateBucketDto, Bucket>(MemberList.None);
        CreateMap<DirResource, DirResourceDto>(MemberList.None);
        CreateMap<CreateOrUpdateDirResourceDto, DirResource>(MemberList.None);
        CreateMap<FileResource, FileResourceDto>(MemberList.None);
        CreateMap<CreateOrUpdateFileResourceDto, FileResource>(MemberList.None);
        CreateMap<Attachment, AttachmentDto>(MemberList.None);
        CreateMap<CreateOrUpdateAttachmentDto, Attachment>(MemberList.None);
        CreateMap<AttachmentConfig, AttachmentConfigDto>(MemberList.None);
        CreateMap<CreateOrUpdateAttachmentConfigDto, AttachmentConfig>(MemberList.None);

        //组织架构行政区划
        CreateMap<Region, RegionDto>(MemberList.None);
        CreateMap<Region, RegionTreeDto>(MemberList.None);
        CreateMap<CreateOrUpdateRegionDto, Region>(MemberList.None);
        CreateMap<Organization, OrganizationDto>(MemberList.None);
        CreateMap<Organization, OrganizationTreeDto>(MemberList.None);
        CreateMap<CreateOrUpdateOrganizationDto, Organization>(MemberList.None);
        CreateMap<Enterprise, EnterpriseDto>(MemberList.None);
        CreateMap<CreateOrUpdateEnterpriseDto, Enterprise>(MemberList.None);

        //报表服务相关
        CreateMap<ReportCategoryConfig, ReportCategoryConfigDto>(MemberList.None);
        CreateMap<CreateOrUpdateReportCategoryConfigDto, ReportCategoryConfig>(MemberList.None);
        CreateMap<HttpApiConfig, HttpApiConfigDto>(MemberList.None);
        CreateMap<CreateOrUpdateHttpApiConfigDto, HttpApiConfig>(MemberList.None);
        CreateMap<ReportConfig, ReportConfigDto>(MemberList.None);
        CreateMap<CreateOrUpdateReportConfigDto, ReportConfig>(MemberList.None);

        //页面通知信息
        CreateMap<Notification, NotificationDto>(MemberList.None);
        CreateMap<CreateOrUpdateNotificationDto, Notification>(MemberList.None);
    }
}
